from typing import Optional
from datetime import datetime
from pydantic import BaseModel, ConfigDict
from .base_schema import BaseSchema


class MerchantBase(BaseSchema):
    #id: int
    merc_no: str
    merc_name: str
    factor_no: Optional[str]
    cert_type: int
    cert_no: str
    status: int
    contact_person: str
    email: str

class MerchantDetail(MerchantBase):
    address: Optional[str]
    create_by: Optional[str]
    update_by: Optional[str]
    create_time: Optional[datetime]
    update_time: Optional[datetime]

class MerchantFee(BaseSchema):
    #id: int
    merc_no: str
    product_code: str
    product_name: str
    pay_channel_code: str
    fee_mode: int
    fee_value: int
    status: int


class MerchantKey(BaseModel):
    id: int
    merc_no: str
    algorithm: str
    status: int
    secret_key: Optional[str]
    pri_key: Optional[str]
    pub_key: Optional[str]
    extras: Optional[str]

